<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: aquamarine;
            /* 设置圆角边框 */
            border-radius: 50%;
            /* 2.将动画设置给div */
            animation-name: move;
            /* 设置动画持续时长 */
            animation-duration: 2s;
            /* 设置动画速度曲线 */
            animation-timing-function: linear;
            /* 设置动画执行次数 infinite n(2)*/
            animation-iteration-count: infinite;
            /* 设置动画反向执行 alternate */
            animation-direction: alternate;
        }
        /* 1.定义动画关键帧 */
    @keyframes move{
        /* 开始 结束 from to */
        /* 需要中间过程 0% 25% 50% 75% 100% */
         /*from{
            margin-left: 0px;
        }
        to{
            margin-left: 200px;
        }*/
        0%{
            transform: translateX(0px) rotate(0deg);
        }
        25%{
            transform:translatex(50px)rotate(90deg);
            border-radius:10px;
            background-color:rgb(135, 169, 255);
        }
        50%{
            transform:translatex(100px)rotate(180deg);
            border-radius:20px;
            background-color:pink;
        }
        75%{
            transform:translateX(150px)rotate(270deg);
            border-radius:35px;
            background-color: blueviolet;
        }
        100%{
            transform:translateX(200px)rotate(300deg);
            border-radius: 50%;
            background-color:yellow;
        }
    }
    /* 定义一个心跳动画 */
    @keyframes pound{
        from{
            transform: none;
        }
        to{
            /* scale 缩放 >1  放大   <1  缩小 */
            transform: scale(1.2);
        }
    }
    img{
        animation: pound .2s linear infinite alternate;
    }
    </style>
    
</head>
<body>
    <div></div>
    <img width="150px" src="../音视频/1.webp" alt="">
</body>
</html>